<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<x:parse xml="${param.xmlstr}" var="xmlData" />
<input type="hidden" name="zh_parsen/fzr_name" value="<x:out select="$xmlData/data/zh_persons/zh_person[@submit_psn='1']/basic_info/zh_name"/>"/>
<input type="hidden" name="zh_parsen/fzr_mobile" value="<x:out select="$xmlData/data/zh_persons/zh_person[@submit_psn='1']/contact/mobile"/>"/>
<input type="hidden" name="zh_parsen/fzr_tel" value="<x:out select="$xmlData/data/zh_persons/zh_person[@submit_psn='1']/contact/tel_work"/>"/>
<input type="hidden" name="zh_parsen/fzr_email" value="<x:out select="$xmlData/data/zh_persons/zh_person[@submit_psn='1']/contact/email"/>"/>
<div class="t_bar"><span class="color_red">*</span>项目基本情况</div>
	<table class="t_css" width="100%" border="0" cellpadding="0"
	    cellspacing="1">
	<col style="width: 25%"/>
	<col style="width: 25%"/>
	<col style="width: 25%"/>
	<col style="width: 25%"/>
	    <tr >
	        <td align="right">项目名称：</td>
	        <td colspan="3">
	        	<span name='proposal/zh_title'>企业购置研发仪器设备补助</span>
	        </td>
	    </tr>
	    <tr >
	        <td align="right">归口管理部门：</td>
	        <td colspan="3">
	        	<c:set var="recomend_org">{'id':'<x:out select="$xmlData/data/proposal/recomend_org_value" />','name':'<x:out select="$xmlData/data/proposal/recomend_org_name" />'}</c:set>
				<cpt:tree key="recommended_org" cacheable="false" className="hn_iuput_kuang " readonly="true" value="${recomend_org}"  label="归口管理部门"
         			id="recomend_org" onlyChooseLeaf="false"  showPattern="all" shieldPattern="0" topCheckbox="true" onClick="initTreeValueExt" />
				<input type="hidden" id="recomend_org_value" name="proposal/recomend_org_value"  class="required"  value="<x:out select="$xmlData/data/proposal/recomend_org_value" />" label="归口管理部门">
				<input type="hidden" name="proposal/recomend_org_name" value="<x:out select="$xmlData/data/proposal/recomend_org_name" />">
	        	
	            <%-- <span name="proposal/recomend_org_gk_name">
 					<x:out select="$xmlData/data/proposal/recomend_org_name"/>
 				</span> --%>
 			</td>
	    </tr>
	    <tr >
	        <td align="right">补助企业类型： </td>
	        <td colspan="3">
				<c:set var="sub_type"><x:out select="$xmlData/data/proposal/sub_type" /></c:set>
				<cpt:checkbox key="sub_type" name="proposal/sub_type"  value="${sub_type }" width="70px;" repeatColumn="3"  style="border: 0px; padding: 0px; margin: 0px;float:left;"  ></cpt:checkbox>
				<input type="hidden" id="sub_type_value" name="proposal/sub_type_value"  class="required"  value="<x:out select="$xmlData/data/proposal/sub_type_value" />" label="补助企业类型">
				<input type="hidden" name="proposal/sub_type_name" value="<x:out select="$xmlData/data/proposal/sub_type_name" />">
			</td>
	    </tr>
	    <tr style="display: none;"/>
	    <tr >
	    	<td align="right">项目联系人姓名：</td>
	    	<td>
	    		<input  type="text" label="项目联系人姓名" name="proposal/contact_psn_cname" class="input_css required" maxlength="30" value="<x:out select="$xmlData/data/proposal/contact_psn_cname" />">
	    		<%-- <span name="proposal/contact_psn_cname"> 
			    	<x:out select="$xmlData/data/organization_persons/organization_person[@psn_type='lianxiren']/contact_name"/>
		    	</span> --%>
		    	<%--<span name="proposal/contact_email" style="display: none;">
			    	<x:out select="$xmlData/data/organization_persons/organization_person[@psn_type='lianxiren']/contact_email"/>
		    	</span>
		    	<span name="proposal/contact_tel" style="display: none;"> 
			    	<x:out select="$xmlData/data/organization_persons/organization_person[@psn_type='lianxiren']/contact_tel"/>
		    	</span>--%>
	    	</td>
	    	<td align="right">联系人手机：</td>
	    	<td>
	    		<%-- <span name="proposal/contact_psn_mobile"> 
			    	<x:out select="$xmlData/data/organization_persons/organization_person[@psn_type='lianxiren']/contact_mobile" /> 
		    	</span> --%>
		    	<input type="text" label="联系人手机" name="proposal/contact_psn_mobile" class="input_css required mobile" onfocus="InitInput.setNumber(this,11,0,0)"  value="<x:out select="$xmlData/data/proposal/contact_psn_mobile" />">
	    	</td>
	    </tr>
		<tr>
			<td align="right">通讯地址：</td>
			<td>
				<input name="proposal/contact_psn_address" label="通讯地址" type="text"  class="input_css required"  maxlength="100" value="<x:out select="$xmlData/data/proposal/contact_psn_address" />"/>

			</td>
			<td align="right">电子邮箱：</td>
			<td>
				<input name="proposal/contact_psn_email" label="电子邮箱" type="text"  maxlength="50"  class="input_css required email"  value="<x:out select="$xmlData/data/proposal/contact_psn_email" />"/>
			</td>
		</tr>
		<tr>
			<%--<td align="right"><span class="color_red">*</span></td>
			<td colspan="3">
				<c:set var="unit_type2_value"><x:out select="$xmlData/data/proposal/unit_type2_value" /></c:set>
				<cpt:checkbox key="unit_type2" name="unit_type2" repeatColumn="4" ></cpt:checkbox>
				<input type="hidden" name="proposal/unit_type2_value" class="required"  value="${unit_type2_value}" label="单位类型">
				<input type="hidden" name="proposal/unit_type2_name" value="<x:out select="$xmlData/data/proposal/unit_type2_name" />"> </td>
		</tr>--%>
		<td align="right">企业类型：<br/>（可多选）</td>
		<td align="left" colspan="3">
			<cpt:checkbox key="enterprise_type1" name="chk_enterprise_type" repeatColumn="4" width="175" onClick="initControlValue(this.id);" style="border: 0px; padding: 0px; margin: 0px;"></cpt:checkbox>
			<input type="hidden" name="organization/chk_enterprise_type_value" class="required" label="企业类型" id="chkChacId" value="<x:out select="$xmlData/data/organization/chk_enterprise_type_value" />"/>
			<input type="hidden" name="organization/chk_enterprise_type_name" value="<x:out select="$xmlData/data/organization/chk_enterprise_type_name" />"/>
		</td>
		</tr>

		<tr >
	    	<td align="right">购置设备总金额（万元）：</td>
	    	<td>
	    		<input type='text' name='proposal/eq_money_togal' class="required" id='eq_money_togal' onfocus="InitInput.setNumber(this,9,4,2)" style="text-align: right;" value='<x:out select="$xmlData/data/proposal/eq_money_togal"/>' label="购置设备总金额">
	    	</td>
			<td align="right">项目申请金额（万元）<br />（按15%）：</td>
			<td>
				<input type='text' name='proposal/request_money1' class="required" id='request_money' onfocus="InitInput.setNumber(this,9,4,2)" style="text-align: right;" value='<x:out select="$xmlData/data/proposal/request_money1"/>' label="项目申请金额">
			</td>
	    </tr>
	    <tr style="display: none;"/>
	    <tr >
				<td align="right">市（县）已补助金额（万元）：</td>
				<td >
					<input type='text' name='proposal/already_money' id='already_money' class="required" onfocus="InitInput.setNumber(this,9,4,2)" style="text-align: right;" value='<x:out select="$xmlData/data/proposal/already_money"/>' label="市（县）已补助金额">
				</td>



	    	<td align="right">省补助经费的设备拟投入研发项目名称：</td>
	    	<td >
	    		<input type='text' name='proposal/already_name' id='already_name' maxlength="50"  class="input_css required" value='<x:out select="$xmlData/data/proposal/already_name"/>' label="省补助经费的设备拟投入研发项目名称">
	    	</td>
		</tr>
	   <%-- <tr >
	    	<td align="right">是否已享受企业所得税加计扣除政策，如未享受请说明原因（限300字）：</td>
	    	<td align="center">
	    		<input type="radio" id="why_1" name="why" value="1" class="do"  onclick="initControlValue(this.id);changeClassDyn2();" /><label>是</label>
				&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
				<input type="radio" id="why_2" name="why" value="2" class="do"  onclick="initControlValue(this.id);changeClassDyn2();" /><label>否</label>
				<input type="hidden" id="why_value" name="proposal/why_value" value="<x:out select="$xmlData/data/proposal/why_value" />" label="是否已享受企业所得税加计扣除政策" class="required"/>
				<input type="hidden" name="proposal/why_name" label="" value="<x:out select="$xmlData/data/proposal/why_name" />"/>
	    	</td>
	    	<td colspan="2">
	    	<!-- <textarea rows="9"  id="why_enjoy1" style="width:82%;display: none;" class="input_textarea maxlength:300" name='why_enjoy' label="未享受原因"></textarea>
			<input type="hidden" id="why_enjoy2" name="why_enjoy_hidden"  id="why_enjoy_hidden" value="" /> -->
			<textarea id="why_enjoy1" name="proposal/why_enjoy" rows="8" cols="150"  style="width: 98%;" label="未享受企业所得税加计扣除政策原因"  class="input_textarea maxlength:300"><x:out select="$xmlData/data/proposal/why_enjoy" escapeXml="false"/></textarea>
     		<input type="hidden" name="proposal/why_enjoy_hidden"  id="why_enjoy2" value="" />
			</td>
	    </tr>--%>
	</table>
<script type="text/javascript">
$(function() {

	/* changeClassDyn1(); */
	changeClassDyn2();
});

function initTreeValueExt(treeId, treeNode) {
 	if ((treeNode && treeNode.isParent)) {
 		scmWarn("请选择具体的" + $("#" + treeId).attr("label"));
 		$("#" + treeId).val("");
 		$("#" + treeId).parents("td").find("[name$='" + treeId + "_code'],[id$='" + treeId + "_code']").val("");
 		$("#" + treeId).parents("td").find("[name$='" + treeId + "_value'],[id$='" + treeId	+ "_value']").val("");
 		$("#" + treeId).parents("td").find("[name$='" + treeId + "_name'],[id$='" + treeId + "_name']").val("");
 		return false;
 	}
 	var str = treeNode.name;
 	var obj = treeNode.parentNode;
 	while (obj != null) {
 		str = obj.name + "-" + str;
 		obj = obj.parentNode;
 	}
 	
 	$("#" + treeId).parents("td").find("[name$='" + treeId + "_code'],[id$='" + treeId + "_code']").val(treeNode.id);
 	$("#" + treeId).parents("td").find("[name$='" + treeId + "_value'],[id$='" + treeId + "_value']").val(treeNode.id);
 	$("#" + treeId).parents("td").find("[name$='" + treeId + "_name'],[id$='" + treeId + "_name']").val(str);
 }
 
function initControlValue(objId){
	
	var name="";
	var obj=$("#"+objId);
    if(obj.is("select")){
    	name=obj.attr("name");
    	obj.parent().children("input[name$='"+name+"_value'][type='hidden']").val($("#"+objId).find("option:selected").val());
    	$("#"+objId).parent().children("input[name$='"+name+"_name']").val($("#"+objId).find("option:selected").text());
    }
   
    else if(obj.is(":radio")){
    	name=obj.attr("name");
    	if(obj.is(":checked")){//如果被选中
    		//alert($("#"+objId).val());		
    		obj.parents("table").find("input[name$='"+name+"_value'][type='hidden']").val($("#"+objId).val());
    		$("#"+objId).parent().children("input[name$='"+name+"_name']").val($("#"+objId).next().text());
    	}
    	else{
    		
    		obj.parents("table").find("input[name$='"+name+"_value'][type='hidden']").val("");
    	}
    }else if(obj.is(":checkbox")){
    	name=obj.attr("name");
    	if(obj.is(":checked"))//如果被选中
    		obj.parent().find("input[name$='"+name+"_value'][type='hidden']").val($("#"+objId).val());
    	else
    		obj.parent().find("input[name$='"+name+"_value'][type='hidden']").val("");
    }else{
    	name=obj.attr("id");
    	obj.parents("td").find("input[name$='"+name+"_name'][type='hidden']").val(obj.val());
    	obj.parents("td").find("input[name$='"+name+"_code'][type='hidden']").val($("#"+objId+"_hideId").val());
    }  	
}
 
function changeClassDyn2(){

	var value =$("#why_value").val();
	if(value=='2'){
		$("#why_enjoy1").attr("class","required input_textarea maxlength:300");
		$("#why_enjoy2").attr("class","input_textarea maxlength:300");
		$("#why_enjoy1").css("display","");
		/* $("#backTime").show();
		$("#backChina").show(); */
	}else{
		$("#why_enjoy1").val("");
		$("#why_enjoy2").val("");
		$("#why_enjoy1").attr("class","input_textarea maxlength:300");
		$("#why_enjoy2").attr("class","input_textarea maxlength:300");
		$("#why_enjoy1").css("display","none");
		/*$("#backTime").hide();
		$("#backChina").hide(); */
	}
	
}
</script>	